package Duoxiancheng;

import java.util.concurrent.*;

public class CountDown {
    static CountDownLatch countDownLatch = new CountDownLatch(10);
        static ExecutorService threadPool = Executors.newFixedThreadPool(10);

    public static void main(String[] args) throws InterruptedException {
        for (int i=0;i<10;i++){
            threadPool.submit(new Runnable() {
                @Override
                public void run() {
                    System.out.println("启动"+Thread.currentThread().getName());
                    countDownLatch.countDown();
                }
            });
        }
        countDownLatch.await();
        System.out.println("fire");
    }
}
